package learningThread.syn.synchronizedMethodLockObj.communicate.pipeStream;

import java.io.PipedOutputStream;

public class ThreadWrite extends Thread{

    private WriteData writeData;

    private PipedOutputStream outStream;

    public ThreadWrite(WriteData writeData, PipedOutputStream outStream) {
        this.writeData = writeData;
        this.outStream = outStream;
    }

    @Override
    public void run() {
        writeData.writeMethod(outStream);
    }
}
